﻿<UserControl x:Class="RaonaShowcase.FlipElement"
    xmlns="http://schemas.microsoft.com/client/2007" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Width="320" Height="240" OpacityMask="#FF000000" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
	<UserControl.Resources>
        <Storyboard x:Name="AnimateFlipForward">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="screenProjection" Storyboard.TargetProperty="(RotationY)">
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="180" KeySpline="0,0,0,1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="front" Storyboard.TargetProperty="(Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0" KeySpline="0,0,0,1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="back" Storyboard.TargetProperty="(Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1" KeySpline="0,0,0,1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="AnimateFlipReverse">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="screenProjection" Storyboard.TargetProperty="(RotationY)">
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0" KeySpline="0,0,0,1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="front" Storyboard.TargetProperty="(Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="1" KeySpline="0,0,0,1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="back" Storyboard.TargetProperty="(Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0" KeySpline="0,0,0,1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="TitleGrowth" AutoReverse="False" >
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="txtTitleFront" Storyboard.TargetProperty="(FontSize)">
                <LinearDoubleKeyFrame KeyTime="00:00:00.5" Value="22"/>
            </DoubleAnimationUsingKeyFrames>
		</Storyboard>
        <Storyboard x:Name="TitleReduce" AutoReverse="False" >
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="txtTitleFront" Storyboard.TargetProperty="(FontSize)">
                <LinearDoubleKeyFrame KeyTime="00:00:00.5" Value="18"/>
            </DoubleAnimationUsingKeyFrames>
		</Storyboard>
        <Storyboard x:Name="SloganColorChange" AutoReverse="False">
			<ColorAnimation Storyboard.TargetName="SloganColor" Duration="00:00:00.5" To="Orange" Storyboard.TargetProperty="Color"/>
		</Storyboard>
        <Storyboard x:Name="SloganColorUndo" AutoReverse="False">
			<ColorAnimation Storyboard.TargetName="SloganColor" Duration="00:00:00.5" To="White" Storyboard.TargetProperty="Color"/>
		</Storyboard>		
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
		<Grid x:Name="grdScreens" RenderTransformOrigin="0.5,0.5" Cursor="Hand" >
            <Grid.Projection>
                <PlaneProjection x:Name="screenProjection" CenterOfRotationY=".51"/>
            </Grid.Projection>

            <!--Clip="M0.5,25.5 L149.5,0.5 L149.5,199.5 L0.5,162.5 z"-->
    		<Grid x:Name="front" RenderTransformOrigin=".5,.5"  Opacity="1" Visibility="Visible">
                <Grid.Projection>
                    <PlaneProjection x:Name="frontProjection" CenterOfRotationY=".51">
                    </PlaneProjection>
                </Grid.Projection>
    			<Border x:Name="brdFrontImage"  HorizontalAlignment="Left" VerticalAlignment="Top">
    				<Image x:Name="imgFront" Source="./Images/Screen/DefaultScreen.png" Stretch="Fill" Visibility="Visible" HorizontalAlignment="Stretch" Margin="0,0,0,0" />
    			</Border>
				
    			<Border x:Name="brdFrontTitle" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Opacity="1" >
    				<Border.Background>
    					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    						<GradientStop Color="#CBFFFFFF"/>
    						<GradientStop Color="#CB000000" Offset="1"/>
    					</LinearGradientBrush>
    				</Border.Background>
    				<TextBlock x:Name="txtTitleFront" Text="Project Title" Foreground="#FFFFFFFF" HorizontalAlignment="Left" VerticalAlignment="Center"  OpacityMask="{x:Null}" FontSize="18" FontWeight="Bold" Margin="20,2,20,2" FontFamily="Calibri"  />
    			</Border>
				
    		</Grid>
    		<Grid x:Name="back" RenderTransformOrigin=".5,.5" Opacity="0" >
    			<Grid.Projection>
    				<PlaneProjection x:Name="backProjection" CenterOfRotationY=".51" RotationY="180"/>
    			</Grid.Projection>
               
    			<Image x:Name="imgBack" Margin="0,0,0,0" Source="./Images/Screen/DefaultScreen.png" Stretch="Fill" Opacity="1" OpacityMask="#FF000000"/>
    			<Border x:Name="brdBackImage" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="#A6000000"/>
    	    		
    			<Border x:Name="brdBackTitle" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Opacity="1" >
    				<Border.Background>
    					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    						<GradientStop Color="#CBFFFFFF"/>
    						<GradientStop Color="#CB000000" Offset="1"/>
    					</LinearGradientBrush>
    				</Border.Background>
    				<TextBlock x:Name="txtTitleBack" Text="Project Title" Foreground="#FFFFFFFF" HorizontalAlignment="Left" VerticalAlignment="Center"  OpacityMask="{x:Null}" FontSize="18" FontWeight="Bold" Margin="20,2,20,2" FontFamily="Calibri"  />
					
    			</Border>
				
			<HyperlinkButton x:Name="urlLink" NavigateUri="http://www.google.com" TargetName="_blank" VerticalAlignment="Bottom" HorizontalAlignment="Right" Foreground="{x:Null}" Background="{x:Null}" Margin="3,0,0,3" IsTabStop="False">
			<HyperlinkButton.Content>
				<Image Source="Images/linkarrow.png" Stretch="None" ToolTipService.ToolTip="Go to Site" Cursor="Hand"/> 
			</HyperlinkButton.Content>	
			</HyperlinkButton>


    			<Grid x:Name="backcontent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
    				<Grid.ColumnDefinitions>
    					<ColumnDefinition Width="0.750*"/>
    					<ColumnDefinition Width="0.250*"/>
    				</Grid.ColumnDefinitions>
    				<Grid.RowDefinitions>
    					<RowDefinition Height="0.150*"/>
    					<RowDefinition Height="0.400*"/>
    					<RowDefinition Height="0.100*"/>
    					<RowDefinition Height="0.100*"/>
    					<RowDefinition Height="0.100*"/>
    					<RowDefinition Height="0.150*"/>
    				</Grid.RowDefinitions>
				
    				<TextBlock HorizontalAlignment="Center" Margin="0,10,0,0" VerticalAlignment="Center" FontFamily="Calibri" FontSize="18" FontWeight="Bold" Text="Slogan" TextAlignment="Center" x:Name="txtSlogan" Height="Auto" Grid.ColumnSpan="2">
    					<TextBlock.Foreground>
    						<SolidColorBrush Color="White" x:Name="SloganColor"/>
    					</TextBlock.Foreground>
    				</TextBlock>
					<TextBlock HorizontalAlignment="Left" Margin="15,0,15,0" VerticalAlignment="Center" FontFamily="Calibri" FontSize="13" FontWeight="Normal" Foreground="#FFFFFFFF" Text="Description Description Description Description Description Description Description Description Description Description Description Description Description Description Description Description Description Description Description Description" TextAlignment="Left" x:Name="txtDescription"  Grid.Row="1" TextWrapping="Wrap" Grid.ColumnSpan="2" />
    				<TextBlock HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Center" FontFamily="Calibri" FontSize="14" FontWeight="Bold" Foreground="#FFFFFFFF" Text="Tag 1" TextAlignment="Center" x:Name="txtTag1" Height="Auto" Grid.Row="2"/>
    				<TextBlock HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Center" FontFamily="Calibri" FontSize="14" FontWeight="Bold" Foreground="#FFFFFFFF" Text="Tag 2" TextAlignment="Center" x:Name="txtTag2" Height="Auto" Grid.Row="3"/>
    				<TextBlock HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Center" FontFamily="Calibri" FontSize="14" FontWeight="Bold" Foreground="#FFFFFFFF" Text="Tag 3" TextAlignment="Center" x:Name="txtTag3" Height="Auto" Grid.Row="4"/>
    				<Image x:Name="imgLogo" Margin="0,0,10,0" Source="" Stretch="Uniform"  Grid.Column="1" Grid.Row="2" Grid.RowSpan="3" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.ColumnSpan="1"/>

    			</Grid>

    		</Grid>
    	</Grid>
    	
    </Grid>
</UserControl>
